package com.admin.model.vo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.*;

import java.io.Serializable;
import java.util.List;

/**
 * @author caixiaofeng
 * @version 1.0
 * @Description: <<>>
 * @company 个人学习
 * @create 2021-02-06 14:56
 */
@ApiModel("菜单树实体类")
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class MenuTreeVo implements Serializable {
    private static final long serialVersionUID = 237720228101276808L;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    //@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @JsonIgnore
    private Long pid;

    private String name;

    private String title;

    private String path;

    private Boolean hidden;

    private String redirect;

    private String component;

    private Boolean alwaysShow;

    private MenuMetaVo meta;

    private List<MenuTreeVo> children;
}
